SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for t_drink
-- ----------------------------
DROP TABLE IF EXISTS `t_drink`;
CREATE TABLE `t_drink`
(
    `id`          bigint NOT NULL AUTO_INCREMENT,
    `create_time` date           DEFAULT NULL,
    `name`        varchar(255)   DEFAULT NULL,
    `price`       decimal(10, 2) DEFAULT NULL,
    `category_id` bigint NOT NULL,
    `image_url`   varchar(255)   DEFAULT NULL,
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  AUTO_INCREMENT = 10
  DEFAULT CHARSET = utf8mb4;

-- ----------------------------
-- Records of t_drink
-- ----------------------------
BEGIN;
INSERT INTO `t_drink` VALUES (1, '2022-09-23', '焦糖红茶拿铁', 15.00, 1, 'https://chantung-drinks.oss-cn-chengdu.aliyuncs.com/1.jpeg');
INSERT INTO `t_drink` VALUES (2, '2022-09-23', '红茶拿铁', 14.00, 1, 'https://chantung-drinks.oss-cn-chengdu.aliyuncs.com/1.jpeg');
INSERT INTO `t_drink` VALUES (3, '2022-09-22', '绿茶拿铁', 14.00, 1, 'https://chantung-drinks.oss-cn-chengdu.aliyuncs.com/1.jpeg');
INSERT INTO `t_drink` VALUES (4, '2022-09-22', '抹茶拿铁', 17.00, 1, 'https://chantung-drinks.oss-cn-chengdu.aliyuncs.com/1.jpeg');
INSERT INTO `t_drink` VALUES (5, '2022-09-24', '茉莉绿茶', 8.00, 2, 'https://chantung-drinks.oss-cn-chengdu.aliyuncs.com/1.jpeg');
INSERT INTO `t_drink` VALUES (6, '2022-09-22', '清香乌龙茶', 8.00, 2, 'https://chantung-drinks.oss-cn-chengdu.aliyuncs.com/1.jpeg');
INSERT INTO `t_drink` VALUES (7, '2022-09-23', '翡翠柠檬', 13.00, 2, 'https://chantung-drinks.oss-cn-chengdu.aliyuncs.com/1.jpeg');
INSERT INTO `t_drink` VALUES (8, '2022-09-22', '乌龙奶茶', 11.00, 3, 'https://chantung-drinks.oss-cn-chengdu.aliyuncs.com/1.jpeg');
INSERT INTO `t_drink` VALUES (9, '2022-09-23', '焦糖奶茶', 12.00, 3, 'https://chantung-drinks.oss-cn-chengdu.aliyuncs.com/1.jpeg');
COMMIT;

-- ----------------------------
-- Table structure for t_order
-- ----------------------------
DROP TABLE IF EXISTS `t_order`;
CREATE TABLE `t_order`
(
    `id`          varchar(255) NOT NULL,
    `create_time` datetime       DEFAULT NULL,
    `customer`    varchar(255)   DEFAULT NULL,
    `total`       decimal(10, 2) DEFAULT NULL,
    `state`       int    NOT NULL DEFAULT '0',
    `version`     int    NOT NULL DEFAULT '0',
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

-- ----------------------------
-- Records of t_order
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for t_order_drink
-- ----------------------------
DROP TABLE IF EXISTS `t_order_drink`;
CREATE TABLE `t_order_drink`
(
    `order_id`       varchar(255) NOT NULL,
    `items_id`       bigint NOT NULL,
    `items_price`    decimal(10, 2) DEFAULT NULL,
    `items_total`    decimal(10, 2) DEFAULT NULL,
    `items_quantity` int    NOT NULL DEFAULT '1',
    PRIMARY KEY (`order_id`, `items_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

-- ----------------------------
-- Records of t_order_drink
-- ----------------------------
BEGIN;
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
